def is_pa(n):
    return str(n)==str(n)[::-1]
# -*- coding: utf-8 -*-

L = [('Bob', 75), ('Adam', 92), ('Bart', 66), ('Lisa', 88)]

def by_name(t):
    return t[0].lower()
L2 = sorted(L, key=by_name)
print(L2)
def by_score(t):
    return -t[1]
L3=sorted(L,key=by_score)
print L3
def by_score1(t):
    return t[1]
L4=sorted(L,key=by_score1)
print 'L4:',L4
L5=sorted(L,key=by_score1,reverse=True)
print L5